Skip to content

feat(cli): cache OAuth tokens between CLI invocations#32

Merged
emilioacc merged 1 commit intomainfrom
emilio/atxp-1427-cache-oauth-tokens-between-cli-invocations
Jan 28, 2026
Merged

feat(cli): cache OAuth tokens between CLI invocations#32
emilioacc merged 1 commit intomainfrom
emilio/atxp-1427-cache-oauth-tokens-between-cli-invocations

Conversation

@emilioacc
Copy link
Contributor

Summary

  • Add FileOAuthDb class that persists OAuth tokens to disk at ~/.atxp/oauth-cache.json
  • Eliminates the need for a fresh OAuth flow on every paas command
  • Tokens are stored with 0o600 permissions (owner read/write only)
  • Expired tokens are automatically detected and removed

Test plan

  • Build passes: npm run build
  • Unit tests pass: npm test
  • Manual test: Run npx atxp paas worker list twice - second call should use cached token without OAuth flow
  • Verify ~/.atxp/oauth-cache.json exists with correct permissions

Fixes ATXP-1427

🤖 Generated with Claude Code

Add FileOAuthDb class that persists OAuth tokens to disk at
~/.atxp/oauth-cache.json. This eliminates the need for a fresh
OAuth flow on every paas command.

- Create FileOAuthDb implementing OAuthDb interface
- Store tokens with 0o600 permissions (owner read/write only)
- Check token expiration on retrieval
- Add unit tests for token persistence and expiration

Fixes ATXP-1427

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@emilioacc emilioacc merged commit 0e1114c into main Jan 28, 2026
1 check passed
@emilioacc emilioacc deleted the emilio/atxp-1427-cache-oauth-tokens-between-cli-invocations branch January 28, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant